#ifndef QDATAMANAGER_H
#define QDATAMANAGER_H

#include "shared_global.h"

#include <QObject>
#include <QMap>
#include <QVariant>

class SHAREDSHARED_EXPORT QDataManager : public QObject
{
    Q_OBJECT
protected:
    explicit QDataManager(QObject *parent = 0);

public:
    static QDataManager*    manager();
    static  void            releaseManager();
    void    setUserData(const QString &key,const QVariant &value);

    QVariant userData(const QString &key,const QVariant &def=QVariant());
signals:
    void    userDataChanged(const QString &key,const QVariant &value);
public slots:

protected:
    QMap<QString,QVariant>      m_userData;

    static  QDataManager*       m_manager;
};

#endif // QDATAMANAGER_H
